package com.sn.author.common.sdk.request;

import com.sn.author.common.sdk.AbstractRequest;
import com.sn.author.common.sdk.response.ImportUserResponse;
import com.sn.author.common.sdk.response.LoginDyResponse;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * @Author xiaom
 * @Date 2020/9/22 17:04
 * @Version 1.0.0
 * @Description <>
 **/
@Getter
@Setter
public class LoginDyRequest  extends AbstractRequest implements Request<LoginDyResponse> {

    private String phone;

    private String password;

    private String deviceId;


    @Override
    protected void setUrlParamsMap(Map<String, Object> map) {
        map.put("phone", phone);
        map.put("password", password);
        map.put("device", deviceId);
    }

    @Override
    public String getApiUrl() {
        return super.getBaseUrl() + "/dy/login";
    }

    @Override
    public Class<LoginDyResponse> getResponseClass() {
        return LoginDyResponse.class;
    }

    @Override
    public Object getUrlParams() {
        setUrlParamsMap(super.urlParamsMap);
        return super.urlParamsMap;
    }

    @Override
    public Object initRequestParams(Map<String, String> paramsMap) {
        return super.initRequestParams(paramsMap, getApiUrl());
    }
}
